<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8" %>
<%@ include file="inc/taglibs.jsp" %>
<!DOCTYPE html>
<html lang="zh-cn">
<head>
    <%@ include file="inc/meta.jsp" %>
    <meta name="description" content="">
    <meta name="author" content="">
    <title>收信人详情</title>
    <%@ include file="inc/css.jsp" %>
</head>
<style>
    .paddingTop {
        padding-top: 6.5px;
    }
</style>

<body>

<div id="posts" class="wrapper">

    <%@ include file="inc/nav.jsp" %>

    <div id="page-wrapper">
        <div class="row">
            <div class="col-lg-12">
                <h1 class="page-header">收信人列表</h1>
                <h4 style="margin-left: 10px;" id="showH">——查看收信人</h4>
            </div>
        </div>

        <div class="row">
            <div class="col-lg-12">
                <div class="panel panel-default">
                    <!-- /.panel-heading -->
                    <div class="panel-body">

                        <form class="form-horizontal nice-validator n-default" role="form" novalidate="novalidate">
                            <c:if test="${null != letterAccept.user}">
                                <div class="form-group">
                                    <label class="col-sm-2 control-label">用户头像:</label>

                                    <div class="col-sm-4" style="padding-top: 6.5px;">
                                        <img src="${letterAccept.user.avatar}" height="120px" width="120px"/>
                                    </div>
                                </div>
                            </c:if>

                            <div class="form-group">
                                <label class="col-sm-2 control-label">用户名称:</label>

                                <div class="col-sm-4" style="padding-top: 6.5px;">
                                    <c:if test="${null != letterAccept.user}">
                                        ${letterAccept.user.nickName}
                                    </c:if>
                                    <c:if test="${null == letterAccept.user}">
                                        管理员
                                    </c:if>
                                </div>
                            </div>

                            <c:if test="${null != letterAccept.user.region}">
                                <div class="form-group">
                                    <label class="col-sm-2 control-label">用户所在地:</label>

                                    <div class="col-sm-4 paddingTop">
                                            ${letterAccept.user.region.city.province.name}${letterAccept.user.region.city.name}
                                    </div>
                                </div>
                            </c:if>

                            <div class="form-group">
                                <label class="col-sm-2 control-label">发送时间:</label>

                                <div class="col-sm-4 paddingTop">
                                    ${createTime}
                                </div>
                            </div>

                            <div class="form-group">
                                <label class="col-sm-2 control-label">寄信人信息:</label>

                                <div class="col-sm-8 paddingTop">
                                    姓名：${letterAccept.letter.userName}<br/>
                                    电话：${letterAccept.letter.mobile}<br/>
                                    地址：${letterAccept.letter.address}
                                </div>
                            </div>

                            <div class="form-group">
                                <label class="col-sm-2 control-label">收信人信息:</label>

                                <div class="col-sm-8 paddingTop">
                                    姓名：${letterAccept.userName}<br/>
                                    电话：${letterAccept.mobile}<br/>
                                    地址：${letterAccept.address}
                                </div>
                            </div>

                            <c:if test="${null != stamp || null != paper || null != mailer}">
                                <div class="form-group">
                                    <label class="col-sm-2 control-label">收信人使用物品:</label>

                                    <div class="col-sm-8 paddingTop">
                                        <c:if test="${null != stamp}">
                                            <div style="float: left;margin-right: 9%;">
                                                <img src="${stamp.cover}" style="margin-bottom: 10px;border: 1px dashed #2e6da4" height="200px" width="200px"><br/>
                                                <span>${stamp.name}</span>
                                                <span style="margin-left: 12px;">￥${stamp.money}</span>
                                                <span style="margin-left: 12px;">${stamp.num}</span><br/>
                                                <span>大头贴</span>
                                            </div>
                                        </c:if>
                                        <c:if test="${null != paper}">
                                            <div style="float: left;margin-right: 9%;">
                                                <img src="${paper.cover}" style="margin-bottom: 10px;border: 1px dashed #2e6da4" height="200px" width="200px"><br/>
                                                <span>${paper.name}</span>
                                                <span style="margin-left: 12px;">￥${paper.money}</span>
                                                <span style="margin-left: 12px;">${paper.num}</span><br/>
                                                <span>纸先生</span>
                                            </div>
                                        </c:if>
                                        <c:if test="${null != mailer}">
                                            <div style="float: left;">
                                                <img src="${mailer.cover}" style="margin-bottom: 10px;border: 1px dashed #2e6da4" height="200px" width="200px"><br/>
                                                <span>${mailer.name}</span>
                                                <span style="margin-left: 12px;">￥${mailer.money}</span>
                                                <span style="margin-left: 12px;">${mailer.num}</span><br/>
                                                <span>纸的恋人</span>
                                            </div>
                                        </c:if>
                                    </div>
                                </div>
                            </c:if>

                            <c:if test="${null != letterAccept.expressName && '' != letterAccept.expressName}">
                                <div class="form-group">
                                    <label class="col-sm-2 control-label">快递公司:</label>

                                    <div class="col-sm-4 paddingTop">
                                            ${letterAccept.expressName}
                                    </div>
                                </div>
                            </c:if>

                            <c:if test="${null != letterAccept.expressNum && '' != letterAccept.expressNum}">
                                <div class="form-group">
                                    <label class="col-sm-2 control-label">快递单号:</label>

                                    <div class="col-sm-4 paddingTop">
                                            ${letterAccept.expressNum}
                                    </div>
                                </div>
                            </c:if>

                            <div class="form-group">
                                <div class="col-sm-12" style="text-align: center">
                                    <a href="backend/letter/accept/index?letterId=${letterAccept.letter.id}" type="button" class="btn btn-primary">返回</a>
                                </div>
                            </div>
                        </form>
                    </div>
                </div>
                <!-- /.panel -->
            </div>
        </div>

    </div>
    <!-- /#page-wrapper -->

</div>
<!-- /#wrapper -->

<%@ include file="inc/footer.jsp" %>

</body>

</html>